Skip to content

Simplify the interface and hide internal implementations that do not need to be exported#15

Merged
FrozenLemonTee merged 14 commits intomainfrom
refactor-meta
Mar 24, 2026
Merged

Simplify the interface and hide internal implementations that do not need to be exported#15
FrozenLemonTee merged 14 commits intomainfrom
refactor-meta

Conversation

@FrozenLemonTee
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings March 24, 2026 03:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the primitives “meta” surface area to expose a simpler, more stable set of traits/concepts while moving several helper implementations out of the exported surface, and adds tests to validate the new meta APIs.

Changes:

  • Export meta::traits as a cvref-stripping alias and introduce meta::primitive_type plus category concepts (boolean, integer, etc.).
  • Hide internal policy/operation helper details by moving them out of exported namespaces (and adjust runtime fencing implementation).
  • Add compile-time/unit tests to validate meta traits and concepts.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/basic/test_underlying.cpp Adds tests validating new meta::traits and category concepts.
src/primitive/traits.cppm Refactors exported meta traits API and adds new primitive category concepts.
src/policy/impl.cppm Moves a set of helper templates/utilities into a non-exported details namespace.
src/operations/operators.cppm Updates operator/dispatch templates to use meta::primitive_type and hides internal concepts.
src/operations/invoker.cppm Re-scopes runtime details and updates runtime fence logic to if !consteval.
src/operations/dispatcher.cppm Switches dispatcher constraints to meta::primitive_type and adjusts traits access.
.github/copilot-instructions.md Updates pointer to the current plans directory location.
.agents/docs/plans/implementation-plan.md Adds an implementation plan document under .agents/docs/plans/.
Comments suppressed due to low confidence (1)

src/operations/dispatcher.cppm:30

  • lhs_traits::value_type / rhs_traits::value_type are dependent member type names inside a class template; they need the typename keyword (otherwise this is ill-formed in standard C++).
  using lhs_traits = meta::traits<lhs_primitive>;
  using rhs_traits = meta::traits<rhs_primitive>;

  using lhs_value_type = lhs_traits::value_type;
  using rhs_value_type = rhs_traits::value_type;

@FrozenLemonTee FrozenLemonTee merged commit a484387 into main Mar 24, 2026
7 checks passed
@FrozenLemonTee FrozenLemonTee deleted the refactor-meta branch March 24, 2026 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants